<template>
    <div class="nav">
          <el-menu
            default-active="2"
            class="el-menu-vertical-demo"
            :router="true"
            @open="handleOpen"
            @close="handleClose">
            <el-menu-item index="car">
              <i class="el-icon-truck"></i>
              <span slot="title">车辆管理</span>
            </el-menu-item>
            <el-menu-item index="fleet">
              <i class="el-icon-postcard"></i>
              <span slot="title">车队管理</span>
            </el-menu-item>
            <el-menu-item index="users">
              <i class="el-icon-user"></i>
              <span slot="title">用户管理</span>
            </el-menu-item>
          </el-menu>
        </div>
</template>

<script>
export default {
    methods: {
      handleOpen(key, keyPath) {
        console.log(key, keyPath);
      },
      handleClose(key, keyPath) {
        console.log(key, keyPath);
      }
    }
}
</script>